package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AdmissionMapper;
import com.ruoyi.system.domain.Admission;
import com.ruoyi.system.service.IAdmissionService;

/**
 * 住院申请Service业务层处理
 * 
 * @author 墨白
 * @date 2024-08-10
 */
@Service
public class AdmissionServiceImpl implements IAdmissionService 
{
    @Autowired
    private AdmissionMapper admissionMapper;

    /**
     * 查询住院申请
     * 
     * @param admissionId 住院申请主键
     * @return 住院申请
     */
    @Override
    public Admission selectAdmissionByAdmissionId(Long admissionId)
    {
        return admissionMapper.selectAdmissionByAdmissionId(admissionId);
    }

    /**
     * 查询住院申请列表
     * 
     * @param admission 住院申请
     * @return 住院申请
     */
    @Override
    public List<Admission> selectAdmissionList(Admission admission)
    {
        return admissionMapper.selectAdmissionList(admission);
    }

    /**
     * 新增住院申请
     * 
     * @param admission 住院申请
     * @return 结果
     */
    @Override
    public int insertAdmission(Admission admission)
    {
        return admissionMapper.insertAdmission(admission);
    }

    /**
     * 修改住院申请
     * 
     * @param admission 住院申请
     * @return 结果
     */
    @Override
    public int updateAdmission(Admission admission)
    {
        return admissionMapper.updateAdmission(admission);
    }

    /**
     * 批量删除住院申请
     * 
     * @param admissionIds 需要删除的住院申请主键
     * @return 结果
     */
    @Override
    public int deleteAdmissionByAdmissionIds(Long[] admissionIds)
    {
        return admissionMapper.deleteAdmissionByAdmissionIds(admissionIds);
    }

    /**
     * 删除住院申请信息
     * 
     * @param admissionId 住院申请主键
     * @return 结果
     */
    @Override
    public int deleteAdmissionByAdmissionId(Long admissionId)
    {
        return admissionMapper.deleteAdmissionByAdmissionId(admissionId);
    }
}
